<script setup>
import { inject } from 'vue';

const money = inject('money')

const spanMoney = inject('spanMoney')
</script>

<template>
    <div class="child-page" style="padding: 50px; border: 10px solid #ccc">
        child 组件-- 爷爷的钱包：{{ money }}
        <div>
            <button @click="spanMoney(5600)">花钱</button>
        </div>
    </div>
</template>